import java.sql.*;
import java.util.*;
class JdbcDemo19 {

	public static void main(String[] args) throws Exception{
		Class.forName("oracle.jdbc.driver.OracleDriver");
		Connection cn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "system","oracle");
		PreparedStatement ps = cn.prepareStatement("select * from employee", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
		ResultSet rs = ps.executeQuery();
		Scanner scan = new Scanner(System.in);
		System.out.println("enter row no");
		int row = scan.nextInt();
		boolean b = rs.absolute(row);
		if(b==false)
		
			System.out.println("invalid row");
		
		else
		{
			System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getFloat(3));
		}
			rs.close();
			ps.close();

	}

}
